using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Domain.Entidades;
namespace Data.Models.Mapping
{
    public class VW_documentos_emailMap : EntityTypeConfiguration<VW_documentos_email>
    {
        public VW_documentos_emailMap()
        {
            // Primary Key
            this.HasKey(t => new { t.doc_codigo, t.usu_codigo });

            // Properties
            this.Property(t => t.doc_codigo)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.usu_codigo)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.usu_email)
                .HasMaxLength(70);

            // Table & Column Mappings
            this.ToTable("VW_documentos_email");
            this.Property(t => t.doc_codigo).HasColumnName("doc_codigo");
            this.Property(t => t.usu_codigo).HasColumnName("usu_codigo");
            this.Property(t => t.usu_email).HasColumnName("usu_email");
        }
    }
}
